﻿/**
 * @file   FITKAbaqusAdaptorMaterialHyperelastic.h
 * @brief 超弹性材料读写
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date 2024-06-17
 */
#ifndef __FITKABAQUSADAPTORMATERIALHYPERELASTIC__H__
#define __FITKABAQUSADAPTORMATERIALHYPERELASTIC__H__

#include "FITKAbaqusAbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

 //前置声明
ForwardDeclarNS(AbaqusData, FITKDataCase)
ForwardDeclarNS(Interface, FITKAbaMaterial)
ForwardDeclarNS(Interface, FITKAbaMaterialHyperElastic)

namespace IO
{
    /**
     * @brief 超弹性材料读写配置器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-06-17
     */
    class FITKAbaqusAdaptorMaterialHyperelastic : public FITKAbaqusAbstractAdaptor
    {
    public:
        explicit FITKAbaqusAdaptorMaterialHyperelastic() = default;
        ~FITKAbaqusAdaptorMaterialHyperelastic() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool adaptW() override;


    private:
        /**
         * @brief 读取超弹性各向同性行为
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool readIsotropicHyperelastic();
        /**
         * @brief 读取超弹性各向同性行为-Arruda_Boyce
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool readIsotropicHyperelasticArruda_Boyce();
        /**
         * @brief 读取超弹性各向同性行为-Mooney_Rivlin
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool readIsotropicHyperelasticMooney_Rivlin();
        /**
         * @brief 读取各项同性测试数据
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool readIsotropicHyperelasticTestData();
        /**
         * @brief 读取超弹性各向异性行为
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool readAnisotropicHyperelastic();
        /**
         * @brief 写出超弹性各向同性行为
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool writeIsotropicHyperelastic();
        /**
         * @brief 写出超弹性各向同性行为-Arruda_Boyce
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool writeIsotropicHyperelasticArruda_Boyce();
        /**
         * @brief 写出超弹性各向同性行为-Mooney_Rivlin
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool writeIsotropicHyperelasticMooney_Rivlin();
        /**
         * @brief 写出超弹性各向异性行为
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool writeAnisotropicHyperelastic();

    private:

        /**
         * @brief 材料数据
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        Interface::FITKAbaMaterial* _materialData{};
    };

    Register2FITKIOAdaptorFactory(INP, Interface::FITKAbaMaterialHyperElastic, FITKAbaqusAdaptorMaterialHyperelastic)

}

#endif
